FROM php:8.1-fpm-alpine
RUN cp /etc/apk/repositories /etc/apk/repositories.bak; \
  sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories; \
  apk add gcc g++ autoconf make zlib-dev libpng-dev libjpeg-turbo-dev freetype-dev; \
  docker-php-ext-configure gd --enable-gd --with-jpeg=/usr/include/ --with-freetype=/usr/include/; \
  docker-php-ext-install gd; \
  docker-php-ext-install pdo_mysql; \
  pecl install redis; \
  apk cache clean 
